import React, { useState } from "react";
import OnlineChat from "../../../components/OnlineChat/OnlineChat";

function SenderTest() {
  const UserList = [];
  for(let i = 1 ; i<=3;i++){
    UserList.push({
      UserId: i,
      Nickname: `用户${i}`,
      AvatarUrl:"https://img2.baidu.com/it/u=2015865969,3401990894&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1666630800&t=0e56d590792d305dab1d410186dab3aa",
      PhoneNumber: `${i}${i}${i}${i}${i}${i}${i}${i}`,
    })
  }
  const to = {
    UserId: "88888888",
    Nickname: "客服",
    AvatarUrl:
      "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fwww.cx6658.com%2Fuploads%2F20190625%2F20292wdmcpw2omk.jpg&refer=http%3A%2F%2Fwww.cx6658.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1669642373&t=fc6de1ca24d8b8e5bd614c7d521c6618",
  };
  
  console.log(UserList);
  return (
    <React.Fragment>
      {
        UserList.map((item,index)=>(
          <div key={index}>
              <OnlineChat
                from={item}
                to={to}
              ></OnlineChat>
          </div>
          
        ))
      }
    </React.Fragment>
  );
}

export default SenderTest;